package com.example.designpatterns.proxy.protection;

/**
 * User类 - 实现ImageOwner接口，表示系统用户
 */
public class User implements ImageOwner {
    private String username;
    private boolean admin;
    
    /**
     * 创建用户
     * @param username 用户名
     * @param admin 是否为管理员
     */
    public User(String username, boolean admin) {
        this.username = username;
        this.admin = admin;
    }
    
    @Override
    public String getUsername() {
        return username;
    }
    
    @Override
    public boolean isAdmin() {
        return admin;
    }
} 